<template>
  <div>
    <button @click="$bus.$emit('heihei', '韦健')">一个小按钮</button>
  </div>
</template>

<script>
export default {
  mounted() {
    this.$bus.$on('haha', function (n) {
      console.log(n)
    })
  }
}
</script>

<style lang="less" scoped>
button {
  width: 160px;
  height: 32px;
  line-height: 32px;
  text-align: center;
  letter-spacing: 3px;
  background-color: #f40;
  border: none;
  border-radius: 4px;
  color: #fff;
}
</style>
